package com.quartz.demo.jobs;

import com.quartz.demo.service.HelloWordService;
import lombok.Getter;
import lombok.Setter;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.SchedulerException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author Lenovo-LQ
 */
@Getter
@Setter
public class HelloWorldJob implements Job {
    @Autowired
    private HelloWordService helloWordService;
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        if(helloWordService !=null){
            helloWordService.batchSendData();
        }
    }
}
